package com.wzq.app.utils;

import android.content.Context;
import android.content.Intent;

import com.wzq.app.constant.IntentKey;
import com.wzq.app.ui.LoginActivity;
import com.wzq.app.ui.MainActivity;

/**
 */

public class LaunchUtils {


    /**
     * 登录
     *
     * @param mContext
     */
    public static void launchLoginGoMain(Context mContext) {
        Intent intent = new Intent(mContext, LoginActivity.class);
        mContext.startActivity(intent);
    }

    /**
     * 登录
     *
     * @param mContext
     */
    public static void launchLogin(Context mContext) {
        Intent intent = new Intent(mContext, LoginActivity.class);
        intent.putExtra(IntentKey.IS_GO_MAIN, false);
        mContext.startActivity(intent);
    }



    /**
     * 跳转到首页
     *
     * @param mContext
     */
    public static void launchMain(Context mContext) {
        Intent intent = new Intent(mContext, MainActivity.class);
        intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
        mContext.startActivity(intent);
    }
}
